﻿using System;
using System.Runtime.Serialization;

namespace EvidenceManagement.Model
{
    [DataContract]
    [DbObject(SelectCommandText = "Employee_Select"
        , InsertCommandText = "Employee_Insert"
        , DeleteCommandText = "Employee_Delete"
        , UpdateCommandText = "Employee_Update")]
    public class Employee : Person, IAuditable
    {
        public Employee()
        {
            Person = new Person();
        }

        [DbColumn]
        [DataMember]
        public Guid EmployeeID
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public Guid DivisionID
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public Guid DesignationID
        {
            get;
            set;
        }

        [DbColumn]
        [DataMember]
        public new Guid PersonID
        {
            get
            {
                return Person.PersonID;
            }
            set
            {
                Person.PersonID = value;
            }
        }

        [DbColumn]
        [DataMember]
        public string EmployeeNumber
        {
            get;
            set;
        }

        public Person Person
        {
            get;
            set;
        }
    }
}
